﻿using System;

namespace diantou.web.enterprise
{
    /// <summary>
    /// 企业通知
    /// </summary>
    [fastCSharp.code.cSharp.webView(IsPage = false, IsPool = true)]
    partial class notice : examPermissionView<notice>
    {
        /// <summary>
        /// 通知集合
        /// </summary>
        private diantou.examDataAccess.enterpriseNotice[] notices;
        /// <summary>
        /// 
        /// </summary>
        /// <param name="page"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        private bool loadView(int page, web.notice.type type)
        {
            switch (type)
            {
                case web.notice.type.Readed:
                    notices = diantou.examDataAccess.tcpCall.enterpriseNotice.getOld(currentUser.Id, pageInfo.Size = fastCSharp.config.pub.Default.PageSize, pageInfo.Page = page, out pageInfo.Count);
                    break;
                case web.notice.type.System:
                    notices = diantou.examDataAccess.tcpCall.enterpriseNotice.getSys(currentUser.Id, currentUser.IsChangeVisit, pageInfo.Size = fastCSharp.config.pub.Default.PageSize, pageInfo.Page = page, out pageInfo.Count);
                    break;
                default:
                    notices = diantou.examDataAccess.tcpCall.enterpriseNotice.getNew(currentUser.Id, pageInfo.Size = fastCSharp.config.pub.Default.PageSize, pageInfo.Page = page, currentUser.IsChangeVisit, out pageInfo.Count);
                    break;
            }
            return true;
        }
    }
}
